home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 10
/
AACD 10.iso
/
AACD
/
Programming
/
AmigaTalk
/
TestFiles
/
TestGraphPaper
< prev
next >
Wrap
Text File
|
2000-05-08
|
964b
|
38 lines
)i AmigaTalk:User/Graph.st
g <- Graph new "Graph is in AmigaTalk:User/Graph.st"
g initialize: 'TestGraph' winTitle: 'TestGraphPaper'
g open: 16r40D20001 from: 0@0 to: 640@480
g setXAxisFrom: -10.0 to: 10.0 by: 0.1
g setYAxisFrom: -100.0 to: 100.0 by: 1.0
crs <- Colors new: 'TestGraphPaper'
crs loadColors: 16 from: 'Amigatalk:AmigaTalk.colors'
crs setWindowColorReg: 1 red: 12 green: 12 blue: 12
crs setWindowColorReg: 2 red: 0 green: 0 blue: 8
crs setWindowColorReg: 3 red: 8 green: 8 blue: 8
crs setWindowColorReg: 4 red: 8 green: 0 blue: 8
crs setWindowColorReg: 5 red: 0 green: 8 blue: 8
crs setWindowColorReg: 6 red: 8 green: 8 blue: 0
g drawGrid: 20 y: 20 color: 2
g drawXAxis: 0.0 numTicks: 10 color: 4
g drawYAxis: 0.0 numTicks: 10 color: 5
g setPen: 1
g drawLabel: 'y-axis' at: 325@9
g drawLabel: 'x-axis' at: 580@230
x1 <- 0.0
y1 <- 0.0
g setPen: 2
(-9.9 to: 10.0 by: 0.1) do: [:x| x1 <- x. y1 <- x * x. g plotPoint: x1 y: y1]